{% extends "base.html" %}

{% block content %}
		<div id="main">
		<div class="room_image" style="{% if room.get_image %}background-image: url('/images/{{room.get_image}}'){% endif %}">
		
		<!-- <img src="images/{{room.get_image}}"/> -->

		{% if cutscene %}
			<div class="cutscene">
			{{cutscene}}
			</div>	
		{% endif %}	
		</div>
		


		
		<div class="room_description">
		<p>{{room.get_description}}</p>
		</div>
		
		<div class="room_inventory inventory">
		{% if room.inventory %}
		<p>You see some stuff in this room:</p>
		<form action="{{this_page}}" method="post">
		{% for item in room.inventory.values %}
		<div class='item' id="{{item.get_id}}" onclick="javascript:this.childNodes[0].checked='checked';document.getElementById('take_items').click()"><input type="checkbox" name="room_inventory" value="{{item.get_id}}"/><div class='label'>{{item.get_description}}</div></div>
		{% endfor %}
		<div><input id='take_items' type="submit" name="inventory" value="Take item(s)"/></div>
		</form>
		{% endif %}
		</div>
		
		<div class="player_inventory inventory">
		<p>Inventory</p>
		{% if player.inventory %}
		<form action="{{this_page}}" method="post">
		{% for item in player.inventory.values %}
		<div class='item' id="{{item.get_id}}" onclick="javascript:this.childNodes[0].checked='checked';document.getElementById('drop_items').click()"><input type="checkbox" name="player_inventory" value="{{item.get_id}}"/><div class='label'>{{item.get_description}}</div></div>
		{% endfor %}
		<div><input id='drop_items' type="submit" name="inventory" value="Drop item(s)"/></div>
		</form>
		{% endif %}
		</div>

		<div class="actions">
		<p>Move</p>
		{% for action in menu.move_actions.values %}
		<div class="action_form">
		<form action="{{this_page}}" method="{{action.get_method}}">
		      <input type="hidden" name="action_name" value="{{action.get_id}}" />
		      <input type="submit" name="action" value="{{action.get_description}}"/>
		</form>
		</div>
		{% endfor %}
		{% if menu.act_actions%}<p>Act</p>{% endif %}
		{% for action in menu.act_actions.values %}
		<div class="action_form">
		<form action="{{this_page}}" method="{{action.get_method}}">
		      <input type="hidden" name="action_name" value="{{action.get_id}}" />
		      <input type="submit" name="action" value="{{action.get_description}}"/>
		</form>
		</div>
		{% endfor %}

		


		</div>
{% endblock content %}
